cmake_minimum_required(VERSION 3.11)
project(gldemo)

set(CMAKE_CXX_STANDARD 11)

find_package(OpenGL)

add_definitions(-DSTBI_NO_DDS)

file(GLOB_RECURSE LEARNING_OPENGL_CS includes/*.c)

include_directories(includes)

add_executable(gldemo sierpinski3d.cpp)

add_executable(demo sierpinski3d.cpp Sphere.cpp)

add_executable(traingle triangle.cpp)

add_executable(sierpinski3d sierpinski3d.cpp)

add_executable(torus torus.cpp)

target_link_libraries(gldemo GL GLU glut glfw GLEW)
target_link_libraries(demo GL GLU glut glfw GLEW)
target_link_libraries(traingle GL GLU glut glfw GLEW)
target_link_libraries(sierpinski3d GL GLU glut glfw GLEW)

add_executable(glstuto ./glsltuto/main.cpp)

target_link_libraries(glstuto GL GLU glut glfw GLEW)

target_link_libraries(torus GL GLU glut glfw GLEW)

add_executable(Sphere Sphere.cpp)
target_link_libraries(Sphere GL GLU glut glfw GLEW)

add_executable(texture ./src/1.getting_started/4.1.textures/textures.cpp ${LEARNING_OPENGL_CS} src/glad.c)
target_link_libraries(texture GL GLU glut glfw GLEW)
target_link_libraries(texture /lib/x86_64-linux-gnu/libdl.so.2)